require_once __DIR__ . '/Maintenance.php';
+use Wikimedia\Rdbms\ResultWrapper;
+
/**
* Maintenance script that sends SQL queries from the specified file to the database.
*
$wiki = $this->hasOption( 'wikidb' ) ? $this->getOption( 'wikidb' ) : false;
// Get the appropriate load balancer (for this wiki)
if ( $this->hasOption( 'cluster' ) ) {
- $lb = wfGetLBFactory()->getExternalLB( $this->getOption( 'cluster' ), $wiki );
+ $lb = wfGetLBFactory()->getExternalLB( $this->getOption( 'cluster' ) );
} else {
$lb = wfGetLB( $wiki );
}
}
if ( $historyFile ) {
# Delimiter is eated by streamStatementEnd, we add it
- # up in the history (bug 37020)
+ # up in the history (T39020)
readline_add_history( $wholeLine . ';' );
readline_write_history( $historyFile );
}
/**
* Print the results, callback for $db->sourceStream()
- * @param ResultWrapper $res The results object
+ * @param ResultWrapper|bool $res The results object
* @param IDatabase $db
*/
public function sqlPrintResult( $res, $db ) {